﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PJ.Framework.Common;
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;

namespace PJ.Framework
{
    public static class ExceptionManager
    {
        /// <summary>
        /// Handle exception
        /// </summary>
        /// <param name="e">Exception to handle</param>
        /// <returns>Rethrow of exception is recommended</returns>
        public static bool Handle(Exception e)
        {
            return InjectionBroker.Resolve<Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionManager>()
                .HandleException(e, "Default");
        }
    }
}
